package com.example.project.constant;


import com.example.project.config.SystemConfig;

public class Constants {

    public static final String TOKEN_KEY = "token";

    public static String SYSTEM_NAME = null;

    public static String PROJECT_ROOT_DIRECTORY = null;

    static {
        if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) {
            PROJECT_ROOT_DIRECTORY = System.getProperty("user.dir") + "/data/";
        } else {
            PROJECT_ROOT_DIRECTORY = "/"+SYSTEM_NAME+"/";
        }
    }


    public interface Redis {
        public String USER_KEY = SYSTEM_NAME + ":uuid:";
        public String CAPTCHA_KEY = SYSTEM_NAME + ":captcha:";

        public String EMAIL_CODE_KEY = SYSTEM_NAME + ":email:";
    }

    public interface File {

        String SPLIT_TAG = ",";

    }


    /**
     * 文件系统存储的时候需要，但是资源映射会失效
     */
    public interface PRO_FILE {

        /**
         * 个人文件存储路径
         * user/userId
         */
        // 个人文件 根/user+userId/
        String SELF_PATH = PROJECT_ROOT_DIRECTORY + "user/%s/";

        /**
         * 项目图片存储路径
         *
         */


    }


}
